# 返回指定状态码
import requests

# 测试 HTTP 状态码接口
def test_status_code(code):
    url = f"https://httpbin.org/status/{code}"
    response = requests.get(url)
    print(f"Requested URL: {url}")
    print(f"Response Status Code: {response.status_code}")

# 测试 200, 404 和 500 状态码
for code in [200, 404, 500]:
    test_status_code(code)
